package eerbaar.expression.internal.lib;

import eerbaar.context.IParams;
import eerbaar.expression.IExpression;
import eerbaar.expression.IExpressionFactory;

public class Factory {

    public static IExpressionFactory andFactory() {

        return new IExpressionFactory() {

            @Override
            public IExpression create(IParams params) {

                return new AndExpression();
            }

        };
    }

    public static IExpressionFactory countElementFactory() {

        return new IExpressionFactory() {

            @Override
            public IExpression create(IParams params) {

                return new CountElementExpression(params);
            }

        };
    }

    public static IExpressionFactory countPointsFactory() {

        return new IExpressionFactory() {

            @Override
            public IExpression create(IParams params) {

                return new CountPointsExpression(params);
            }

        };
    }

    public static IExpressionFactory findProgramFactory() {

        return new IExpressionFactory() {

            @Override
            public IExpression create(IParams params) {

                return new FindProgramExpression(params);
            }

        };
    }

    public static IExpressionFactory messageFactory() {

        return new IExpressionFactory() {

            @Override
            public IExpression create(IParams params) {

                return new MessageExpression(params);
            }

        };
    }

    public static IExpressionFactory orFactory() {

        return new IExpressionFactory() {

            @Override
            public IExpression create(IParams params) {

                return new OrExpression();
            }

        };
    }

    public static IExpressionFactory petOnElementFactory() {

        return new IExpressionFactory() {

            @Override
            public IExpression create(IParams params) {

                return new PetOnElementExpression(params);
            }

        };
    }

}
